﻿<%@ Page Title="" Language="C#" MasterPageFile="~/user/usermain.Master" AutoEventWireup="true" CodeBehind="price_set.aspx.cs" Inherits="uswinweb.user.price_set" %>
<%@ Register TagPrefix="win" TagName="RoutBaseList" Src="~/datacontrol/RoutBaseList.ascx" %>
<%@ Register TagPrefix="win" TagName="SearchHead" Src="~/customcontrol/usersearch.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headcontent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="maincontent" runat="server">
<input type="button" id="reclick" name="reclick" onclick="reclcik()" style="display: none"  />
<input type="hidden" id="selecthidd" value="<%=userinfo.authority.Contains("select") == true||userinfo.gid==2?"1":"0" %>" />
<win:SearchHead runat="server" ID="shead" />
<div class="cot">
	<div class="adnr">
		<ul class="adnr2">
			<%if(OpAction(LTJ.Entity.OprateAction.Create)){%>
            <li><a href="price_add.aspx" rel="iframe" title=" :: :: width:800,height:600" class="lightview">新 增</a></li>
            <%}%>
			<%if(OpAction(LTJ.Entity.OprateAction.Update)){%>
            <li><a href="#" title="" onclick="openview(1,800,600)">批量价格修改</a></li>
			<li><a href="#" title="" onclick="openview(2,800,600)">批量基本信息修改</a></li>
			<li><a href="#" title="" onclick="openview(3,800,600)">批量备注修改</a></li>
            <%}%>
            <%if(OpAction(LTJ.Entity.OprateAction.Delete)){%>
			<li><a href="#" title="" onclick="del('all')">批量删除</a></li>
            <%}%>
		</ul>
			<div id="routbaselistDiv">
                <win:RoutBaseList runat="server" ID="RoutBaseList1" />
            </div>
		<i class="tp"></i><i class="bt"></i>
	</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="footcontent" runat="server">
<script type="text/javascript">
    <%=Form.ClientID%>.onkeydown = function () { if (event.keyCode == 13) SearchFn(); }
    jQuery(document).ready(function () {
        jQuery("#soso").find("li").mouseover(function () {
            jQuery("#soso").find("li").removeClass().addClass("ust1");
            jQuery(this).removeClass().addClass("ust2");
        });
        jQuery("#repcot").Exchange({ MIDS: "rept", CIDS: "repnr", count: 4, mousetype: 0 });
        choose("popxg");
    });
    function openview(type, w, h) {
        if (checkedlist('ids').length > 0) {
            if (type == 1) {
                Lightview.show({ href: '../batchupdate_price.aspx?idlist=' + checkedlist('ids'), rel: 'iframe', options: { width: w, height: h} });
            }
            if (type == 2) {
                Lightview.show({ href: '../batchupdate_info.aspx?idlist=' + checkedlist('ids'), rel: 'iframe', options: { width: w, height: h} });
            }
            if (type == 3) {
                Lightview.show({ href: '../batchupdate_bio.aspx?idlist=' + checkedlist('ids'), rel: 'iframe', options: { width: w, height: h} });
            }
        }
    }
    function reclcik() {
        loading();
        AjaxHelper.Updater('RoutBaseList.ascx', 'routbaselistDiv', 'action=reclick');
    }
    function routesSearch() {
        var keyword = document.getElementById('keyword_txt').value;
        if (keyword == "输入港口、航线、船公司、运价等进行搜索") {
            keyword = "";
        }
        if (document.getElementById('isonly').checked == true) {
            if (keyword == "") {
                window.location.href = '../search.aspx?cid=' + document.getElementById('isonly').value;
            }
            else {
                window.location.href = '../search.aspx?keyword=' + keyword + '&cid=' + document.getElementById('isonly').value;
            }
        }
        else {
            if (keyword == "") {
                window.location.href = '../search.aspx';
            }
            else {
                window.location.href = '../search.aspx?keyword=' + keyword;
            }
        }
    }
    function SearchFn() {
        if (document.getElementById('selecthidd').value == '1') {
            var qyg = document.getElementById('searchqyg_txt').value;
            var mdg = document.getElementById('searchmdg_txt').value;
            var hx = document.getElementById('searchhx_txt').value;
            var cgs = document.getElementById('searchcgs_txt').value;
            DoSearch(qyg, mdg, hx, cgs);
        }
        else {
            alert('您没有查询的权限！');
        }
    }
    function shipcomp_luffy(val1, val2, val3) {
        if (document.getElementById('selecthidd').value == '1') {
            var qyg = document.getElementById('searchqyg_txt').value;
            var mdg = document.getElementById('searchmdg_txt').value;
            var hx = document.getElementById('searchhx_txt').value;
            var cgs = document.getElementById('searchcgs_txt').value;
            document.getElementById('searchcgs_txt').value = val3;
            document.getElementById(val2 + '_mino').innerHTML = val1;
            document.getElementById(val2 + '_div').slideUp("slow");
            cgs = val3;
            DoSearch(qyg, mdg, hx, cgs);
        }
        else {
            alert('您没有查询的权限！');
        }
    }
    function luffy(val1, val2, val3) {
        if (document.getElementById('selecthidd').value == '1') {
            var qyg = document.getElementById('searchqyg_txt').value;
            var mdg = document.getElementById('searchmdg_txt').value;
            var hx = document.getElementById('searchhx_txt').value;
            var cgs = document.getElementById('searchcgs_txt').value;
            document.getElementById('searchhx_txt').value = val3;
            document.getElementById(val2 + '_mino').innerHTML = val1;
            document.getElementById(val2 + '_div').slideUp("slow");
            hx = val3;
            DoSearch(qyg, mdg, hx, cgs);
        }
        else {
            alert('您没有查询的权限！');
        }
    }
    function DoSearch(qyg, mdg, hx, cgs) {
        if (qyg == "装运港") {
            qyg = "";
        }
        if (mdg == "目的港") {
            mdg = "";
        }
        if (hx == "航线" || hx == "0") {
            hx = "";
        }
        if (cgs == "船公司" || cgs == "0") {
            cgs = "";
        }
        AjaxHelper.Updater('RoutBaseList.ascx', 'routbaselistDiv', 'action=search&hx=' + encodeURIComponent(hx).replace("'", "%27") + '&qyg=' + encodeURIComponent(qyg).replace("'", "%27") + '&cs=' + encodeURIComponent(cgs).replace("'", "%27") + '&mdg=' + encodeURIComponent(mdg).replace("'", "%27"));
        loading();
    }
</script>
</asp:Content>
